package com.extend;

public class Dog extends Animal {
	public void say(){
		System.out.println("hi , i am dog");
	}
	
	public static void main(String[] args) throws InstantiationException, IllegalAccessException{
		Dog.class.newInstance().say();
		
		Animal dog = new Dog();
		dog.say();
		
		//Dog  a = (Dog) new Animal(); //错误
	
	}
}
